﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BlackBBS.Helpers;
using BlackBBS.Models.Data;
using BlackBBS.Enums;
using BlackBBS.Infrastructure.TelnetProtocol;

namespace BlackBBS.Menus
{
    public class CallHistory : MenuBase
    {
        public CallHistory()
        {
        }

        public override void SendMenu()
        {
            this.Connection.SetCurrentArea(Area.CallHistory);

            this.Connection.ClearScreen();
            var callHistoryDetails = BlackBBS.Models.Data.CallHistory.CallHistoryDetails(this.Connection.Repository, 20);
            foreach (var ch in callHistoryDetails)
            {
                this.Connection.SendString(ch);
            }
            this.Connection.SendPressAnyKeyToContinue();
            base.SendToMain();
        }
    }
}
